package 观察者模式;

public class Test {
    public static void main(String[] args) {
        Goods goods = new Goods(100);
        goods.addObserver(new Manager());
        goods.addObserver(new Producer());
        goods.addObserver(new Consumer());
        goods.setPrice(101);
    }
}
